\documentclass[11pt]{article}
%% \topmargin -1.5cm        % read Lamport p.163
%% \oddsidemargin -0.04cm   % read Lamport p.163
%% \evensidemargin -0.04cm  % same as oddsidemargin but for left-hand pages
%% \textwidth 16.59cm
%% \textheight 21.94cm 
%$ %\pagestyle{empty}       % Uncomment if don't want page numbers
\parskip 7.2pt           % sets spacing between paragraphs
%% %\renewcommand{\baselinestretch}{1.5} % Uncomment for 1.5 spacing between lines
\parindent 0pt		 % sets leading space for paragraphs

\usepackage{fullpage}
\usepackage{listings} % For source code
\usepackage[usenames,dvipsnames]{color} % For colors and names
\usepackage[pdftex]{graphicx}
\usepackage{subfigure}

\usepackage{fixltx2e}
\usepackage{amssymb,amsmath}

\definecolor{mygrey}{gray}{.96} % Light Grey
\lstset{ 
        language=[ISO]C++,              
        tabsize=3,                                                     
        basicstyle=\tiny,               
        numbers=left,                   
        numberstyle=\tiny,              
        stepnumber=2,                   
        numbersep=5pt,                  
        backgroundcolor=\color{white}, 
        %showspaces=false,              
        %showstringspaces=false,        
        %showtabs=false,                
        frame=single,                    
        tabsize=3,                          
        captionpos=b,                   
        breaklines=true,                
        breakatwhitespace=false,        
        %escapeinside={\%*}{*)},        
        commentstyle=\color{BrickRed}   
}

\title{Northeastern University \\
  Department of Electrical and Computer Engineering \\
  - \\
  ECE5666}
\date{\today}
\author{
  Paul Ozog \\
  Instructor: Deniz Erdogmus
}

\begin{document}

\maketitle

\section{Part 1 - Kaiser Window}
The results of the script are shown in Figure \ref{fig:mp1}.

\begin{figure}[h]
  \begin{center}
    \includegraphics[scale=0.6]{mp1.pdf}
    \caption{Part 1 Magnitude and Phase Response}
    \label{fig:mp1}
  \end{center}
\end{figure}

By default, the specs weren't completely met.  Though the \texttt{kaiserord} function gave an order of 
\begin{math}
  N = 73,
\end{math}
this resulted in rippling in the stop band that was over the maximum allowable stop band ripple 
\begin{math}
  d_s.
\end{math}

Increasing the order by 1, the specs were met as shown in Figure \ref{fig:part1}.  The maximum stop band ripple became 0.000953. So the minimum order such that the specs were strictly met is
\begin{math}
  \boxed{N = 74}
\end{math}


\begin{figure}
  \begin{center}
    \includegraphics[scale=0.6]{part1.pdf}
    \caption{Area of interest for part 1 (stopband, N = 74)}
    \label{fig:part1}
  \end{center}
\end{figure}

\section{Part 2 - Parks-McClellan}
The results of the script are shown in Figure \ref{fig:mp2}.

\begin{figure}[h]
  \begin{center}
    \includegraphics[scale=0.6]{mp2.pdf}
    \caption{Part 2 Magnitude and Phase Response}
    \label{fig:mp2}
  \end{center}
\end{figure}

\begin{figure}
  \begin{center}
    \includegraphics[scale=0.6]{part2.pdf}
    \caption{Area of interest for part 2 (passband, N = 55)}
  \end{center}
\end{figure}
For the Parks-McClellan method, the pass band became the primary issue in strictly meeting the specifications.  With \texttt{firpmord} giving an order of 51, the pass band ripple of the FIR was above the maximum allowable ripple 
\begin{math}
  d_s.
\end{math}
Increasing the order by 4, the ripple was within specifications because the maximum pass band magnitude was 1.0090.  Therefore, the minimum order is 
\begin{math}
  \boxed{N = 55}.
\end{math}


\section{Part 3 - Constrainted Least Squares}
The results of the script are shown in Figure \ref{fig:mp3}.

For this method, the primary concern is the stop band at 
\begin{math}
  \Omega_s = .3 \pi \frac{rad}{sample}
\end{math}

When the order is 84, the maximum ``ripple'' (or more accurately - the absolute difference from 
\begin{math}
  |H(e^{j\omega})| = 0)
\end{math}
is .000936.  Therefore, the minimum order to meet the design spec is 
\begin{math}
  \boxed{N = 84}.
\end{math}

\begin{figure}[h]
  \begin{center}
    \includegraphics[scale=0.6]{mp3.pdf}
    \caption{Part 3 Magnitude and Phase Response}
    \label{fig:mp3}
  \end{center}
\end{figure}

\begin{figure}
  \begin{center}
    \includegraphics[scale=0.6]{part3.pdf}
    \caption{Area of interest for part 3 (stopband, N=84)}
    \label{fig:part1}
  \end{center}
\end{figure}

\end{document}
